//
//  SPTabBarController.m
//  Sport
//
//  Created by Cass on 2018/2/7.
//  Copyright © 2018年 Cass. All rights reserved.
//

#import "SPTabBarController.h"
#import "SPIssueViewController.h"
#import "SPHomeViewController.h"
#import "SPMineViewController.h"
#import "SPMessageViewController.h"
#import "SPFriendsViewController.h"
#import "SPNavigationController.h"
#import "SPTabbar.h"
@interface SPTabBarController ()<SPTabbarDelegate>

@end

@implementation SPTabBarController

- (void)viewDidLoad {
    [super viewDidLoad];
    SPTabbar *tabbar = [[SPTabbar alloc]init];
    tabbar.myDelegate = self;
    
    //kvc实质是修改了系统的_tabBar
    [self setValue:tabbar forKey:@"tabBar"];
    
}

#pragma mark - SPTabbarDelegate -
- (void)tabbarPlusBtnClick:(SPTabbar *)tabbar{
    SPIssueViewController *plusVC = [[UIStoryboard storyboardWithName:@"Issue" bundle:[NSBundle mainBundle]] instantiateViewControllerWithIdentifier:NSStringFromClass([SPIssueViewController class])];
    SPNavigationController *navVC = [[SPNavigationController alloc]initWithRootViewController:plusVC];
    [self presentViewController:navVC animated:YES completion:nil];

}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}



@end
